package com.hluobo.library.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name="t_book")
public class Book {
	
	private int id; 
	private String name; // 图书名称
	private String author; // 作者
	private String publisher; // 出版商
	private Date publish_dt; // 出版日期
	private String ISBN; // ISBN
	private int edition; // 版本号
	private String category; // 类别，暂时定为字符串
	private String category_cd; // 类别编号(用于中国图书馆编号)
	private Date instock_dt; // 图书入库日期
	private int instock_by; // 入库人
	private boolean visible = true; // 是否可见（删除标志）
	private String img_url; //图片url地址
	
	@Id @GeneratedValue
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	
	@Column(length=100)
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	@Column(length=20)
	public String getAuthor() {
		return author;
	}
	public void setAuthor(String author) {
		this.author = author;
	}
	
	@Column(length=50)
	public String getPublisher() {
		return publisher;
	}
	public void setPublisher(String publisher) {
		this.publisher = publisher;
	}
	
	public Date getPublish_dt() {
		return publish_dt;
	}
	public void setPublish_dt(Date publish_dt) {
		this.publish_dt = publish_dt;
	}
	public String getISBN() {
		return ISBN;
	}
	public void setISBN(String iSBN) {
		ISBN = iSBN;
	}
	@Column(nullable=false)
	public int getEdition() {
		return edition;
	}
	public void setEdition(int edition) {
		this.edition = edition;
	}
	public String getCategory() {
		return category;
	}
	public void setCategory(String category) {
		this.category = category;
	}
	public String getCategory_cd() {
		return category_cd;
	}
	public void setCategory_cd(String category_cd) {
		this.category_cd = category_cd;
	}
	public Date getInstock_dt() {
		return instock_dt;
	}
	public void setInstock_dt(Date instock_dt) {
		this.instock_dt = instock_dt;
	}
	
	@Column(nullable=false)
	public int getInstock_by() {
		return instock_by;
	}
	public void setInstock_by(int instock_by) {
		this.instock_by = instock_by;
	}
	public boolean isVisible() {
		return visible;
	}
	public void setVisible(boolean visible) {
		this.visible = visible;
	}
	public String getImg_url() {
		return img_url;
	}
	public void setImg_url(String img_url) {
		this.img_url = img_url;
	}
	
}
